from modelscope.msdatasets import MsDataset
from modelscope.utils.constant import DownloadMode

## set dataset path
cache_dir = r'D:\pycharmProj\pytorch-video-recognition\data\3rd_Anti-UAV'

# Download train set
# train_set = MsDataset.load('3rd_Anti-UAV', namespace='ly261666', split='train', cache_dir=cache_dir,
#                            download_mode=DownloadMode.REUSE_DATASET_IF_EXISTS)
# print(next(iter(train_set)))

# Download validation set
val_set = MsDataset.load('3rd_Anti-UAV', namespace='ly261666', split='validation', cache_dir=cache_dir,
                         download_mode=DownloadMode.REUSE_DATASET_IF_EXISTS)
print(next(iter(val_set)))
print("compleated!")
